import request from '@/utils/request'

// 查询商品分类列表
export function listStoreCategory(query) {
  return request({
    url: '/business/storeCategory/list',
    method: 'get',
    params: query
  })
}

// 查询商品分类所有列表
export function listAllStoreCategory(query) {
  return request({
    url: '/business/storeCategory/listAll',
    method: 'get',
    params: query
  })
}

// 查询商品分类所有列表
export function listParentCategory(query) {
  return request({
    url: '/business/storeCategory/queryListByParentId',
    method: 'get',
    params: query
  })
}


// 查询父类菜单
export function getCates(query) {
  return request({
    url: '/business/storeCategory/parentList',
    method: 'get',
    params: query
  })
}

// 查询商品分类详细
export function getStoreCategory(id) {
  return request({
    url: '/business/storeCategory/getInfo/' + id,
    method: 'get'
  })
}

// 新增商品分类
export function addStoreCategory(data) {
  return request({
    url: '/business/storeCategory/add',
    method: 'post',
    data: data
  })
}

// 修改商品分类
export function updateStoreCategory(data) {
  return request({
    url: '/business/storeCategory/edit',
    method: 'post',
    data: data
  })
}

// 删除商品分类
export function delStoreCategory(id) {
  return request({
    url: '/business/storeCategory/delete/' + id,
    method: 'get'
  })
}
